package wangjg.android.wifiadmin;


import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.os.Parcel;
import android.util.Log;
/**
 * 
 * @author wangjg
 *
 */
public class WifiService extends Service{
	
	void startActivity(){
		Intent activity = new Intent(this, WifiAdminActivity.class);
		activity.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK );
		this.startActivity(activity);
	}
	
    public void onCreate() {
    	super.onCreate();
    	Log.d(this.getClass().getSimpleName(), "onWifiStatusChange");
    }
    
	public void onDestroy() {
		Log.d(this.getClass().getSimpleName(), "onDestroy");
	}

	public int onStartCommand(Intent intent, int flags, int startId) {
		BizModule.checkNetStatus(this, intent);
		return super.onStartCommand(intent, flags, startId);
	}
    
	@Override
	public IBinder onBind(Intent intent) {
		return new MyBinder();
	}

	public class MyBinder extends Binder {

		public WifiService getService() {
			return WifiService.this;
		}

		public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws android.os.RemoteException {
			return transact(code, data, reply, flags);
		}
	}
}
